Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deTCPConnection.hpp

Go to the documentation of this file.
00001 ///////////////////////////////////////////////////////////////////////////////
00002 /// @file deTCPConnection.hpp
00003 ///
00004 /// @brief 
00005 ///
00006 /// @author trajar
00007 ///
00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
00009 /// contents of this file is subject to the Destiny3D Member License which
00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
00011 ///
00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
00014 /// for any particular purpose.
00015 ///
00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
00017 ///
00018 /// <hr>
00019 ///                                 Change History
00020 /// <hr>
00021 ///
00022 /// @date Jun 2002
00023 /// @author trajar
00024 /// @remarks Creation
00025 ///
00026 ///////////////////////////////////////////////////////////////////////////////
00027 
00028 #ifndef _DETCPCONNECTION_HPP
00029 #define _DETCPCONNECTION_HPP
00030 
00031 #ifdef      _DENET_HPP
00032  #include   "deNet.hpp"
00033 #endif
00034 
00035 #ifdef      _DENETWINSOCK_HPP
00036  #include   "deNetWinsock.hpp"
00037 #endif
00038 
00039 #ifndef     _DECONNECTION_HPP
00040  #include   "deConnection.hpp"
00041 #endif
00042 
00043 #include    <VECTOR>
00044 typedef     std::vector< deTCPOVERLAPPED* > aPendingTCPSends;
00045 
00046 typedef class DENET_API deTCPConnection : public deConnection
00047 {
00048     friend class deTCPConnectionProvider;
00049 
00050 public:
00051     deTCPConnection(void);
00052     virtual ~deTCPConnection(void);
00053 
00054     struct TCPConnectionInfo
00055     {   
00056         GROUP           gGroup;
00057         WSAEVENT        hEvent;
00058         SOCKET          hSocket;
00059         SOCKADDR_IN     address;
00060     };
00061 
00062     const   TCPConnectionInfo&  GetConnectionInfo(void)     const   { return m_ConnectionInfo; }
00063 
00064     void                ReleasePendingTCPSend( deTCPOVERLAPPED * pOver );
00065 
00066 protected:
00067 
00068     virtual eNetError   OnAttemptReset( DWORD dwFlags = NULL );
00069     virtual eNetError   OnBindAsServer( DWORD dwFlags = NULL );
00070     virtual eNetError   OnRecieve( DWORD dwFlags = NULL );
00071     virtual eNetError   OnConnectTo( deNetAddress * pAddress );
00072     virtual eNetError   OnSend( WORD pNetMsgID, const void * pBuff, DWORD iSize, DWORD dwFlags = NULL );    
00073     virtual eNetError   OnDisconnect( DWORD dwFlags = NULL );
00074     
00075 private:
00076 
00077     aPendingTCPSends    m_aPendingTCPSends;
00078     TCPConnectionInfo   m_ConnectionInfo;
00079 
00080 } deTCPConnection, *pdeTCPConnection;
00081 
00082 #endif

Generated on Mon Sep 12 19:58:40 2005 for Destiny3D by doxygen1.3-rc3